<?php

/**
* base
*/
require_once 'Naneau/Db/Table/Modifier.php';

/**
* dates are kinda handy when working with... dates
*/
require_once 'Zend/Date.php';

class Naneau_Db_Table_Modifier_Date implements Naneau_Db_Table_Modifier {
    /**
    * get date
    *
    * @return Zend_Date
    */
    public function modify($timestamp, $row) {
        return new Zend_Date($timestamp, null, Zend_Registry::get('locale'));
    }

    /**
    * set a date
    *
    * @param Zend_date $date
    */
    public function unModify($date, $row) {
        return $date->get();
    }
}